// A greedy Algorithm for filling a group
// Input: Graph G=(V,E); Group S to be filled; 
// integer m = the required size of S (m<0 == no limitation)
// Output: The graph G & the group S after filling S.


#ifndef GREEDYFILLGROUPALGORITHM_H 
#define GREEDYFILLGROUPALGORITHM_H
#include "Vertex.h"
#include "RankSet.h"
#include "Group.h"
#include "Graph.h"
#include "VertexSet.h"
#include "VertexDirectory.h"
#include "Helpers.h"
#include <cstdlib>
class GreedyFillGroupAlgorithm
{
	public:
		static Group& FillSingles(Graph& graph  /* also output parameter */, Group& group, 
			VertexDirectory* directory,
			int size = Algorithms::_NO_SIZE_LIMITATION);
		static Group& FillCouples(Graph& graph  /* also output parameter */, Group& group,
			VertexDirectory* directory,
			int size = Algorithms::_NO_SIZE_LIMITATION);


	private:
	// Methods used by the algorithm when filling a group
		static void RemoveNeighboursFromGraph(Graph& graph, Group& group);
		static void RemoveVertexNeighboursFromGraph(Graph& graph, Vertex* vertex);
		static void RemoveVertexNeighboursFromGraph(Graph &graph, VertexSet* vertices);
				
		
};

#endif //GREEDYFILLGROUPALGORITHM_H
